package com.group.www.service.impl;

import com.group.www.dao.impl.BrandRegisterDao;
import com.group.www.interfaces.BrandRegisterServiceI;
import com.group.www.pojo.BrandRegister;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@com.alibaba.dubbo.config.annotation.Service
@Service
public class BrandRegisterServiceImp implements BrandRegisterServiceI<BrandRegister> {
    @Autowired
    private BrandRegisterDao dao;
    @Override
    public boolean add(BrandRegister bregister) {
        return dao.addBrandRegister(bregister);
    }

    /***GJ***/
    @Override
    public List<BrandRegister> queryAll() {
        return dao.queryAll();
    }

    @Override
    public BrandRegister queryById(Integer brId) {
        return dao.queryById(brId);
    }

    @Override
    public BrandRegister queryOkId(Integer brId) {
        return dao.queryById(brId);
    }

    @Override
    public boolean daleteBrand(BrandRegister bregister) {
        String id=bregister.getBrid().toString();
        return dao.delete(id);
    }

    @Override
    public boolean daleteMany(String brandIs) {
        return dao.delete(brandIs);
    }
}
